package cn.yougou.serviceImpl;

import cn.yougou.mapper.YgCommoditySpecificationMapper;
import cn.yougou.pojo.YgCommoditySpecification;
import cn.yougou.service.admin.YgAdminCsService;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * 商品规格
 */

@Service
public class YgAdminCsServiceImpl implements YgAdminCsService {

    @Autowired
    private YgCommoditySpecificationMapper ygCommoditySpecificationMapper;

    /**
     * 插入数据
     * @param ygCommoditySpecification
     * @return
     */
    @Override
    public int insert(YgCommoditySpecification ygCommoditySpecification) {
        return ygCommoditySpecificationMapper.insert(ygCommoditySpecification);
    }

    /**
     * 逻辑删除
     * @param ygCommoditySpecification
     * @return
     */
    @Override
    public int delete(YgCommoditySpecification ygCommoditySpecification) {
        return ygCommoditySpecificationMapper.delete(ygCommoditySpecification);
    }

    /**
     * 根据实体类查询
     * @param ygCommoditySpecification
     * @return
     */
    @Override
    public List<YgCommoditySpecification> queryList(YgCommoditySpecification ygCommoditySpecification) {
        return ygCommoditySpecificationMapper.queryAll(ygCommoditySpecification);
    }

    /**
     * 根据实体类更新
     * @param ygCommoditySpecification
     * @return
     */
    @Override
    public int update(YgCommoditySpecification ygCommoditySpecification) {
        return ygCommoditySpecificationMapper.update(ygCommoditySpecification);
    }


}
